//
//  NSString+charLine.m
//  Delicious2
//
//  Created by dllo on 16/1/8.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "NSString+charLine.h"

@implementation NSString (charLine)

- (NSString *)changeLineString {
    NSString *string = self;
    NSMutableArray *strArray = [NSMutableArray arrayWithCapacity:0];
    for (int i = 0; i < string.length; i++) {
        NSRange range = {i, 1};
        [strArray addObject:[string substringWithRange:range]];

    }

    NSString *strChange = @"";
    for (int i = 0; i < strArray.count; i++) {
        strChange = [[strChange stringByAppendingFormat:@"%@", strArray[i]] stringByAppendingString:@"\n"];
    }
    return strChange;
}

@end
